// 

// This module is actually a GPU, and it connect to 
// cpu and nic.
// It is module response to send out and recieve
// packets

package ib_cluster.network_module.computation;

simple Gpu {
    parameters:
        @dataplane;
        @worker;
        int my_index;
        int my_global_index;
        int numNvlink_port = default(4);
        @signal[packetReceived](type=FlowMsg);
        @signal[packetSent](type=FlowMsg);
        @statistic[packetReceived](title="packets received"; source=packetReceived; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none);
        @statistic[packetSent](title="packets sent"; source=packetSent; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none);
        //@statistic[endToEndDelay](title="end-to-end delay"; source="dataAge(packetReceived)"; unit=s; record=histogram,vector; interpolationmode=none);
    
    gates:
        inout manager_port;  // Connected to CPU module
        inout socket_port;  // Connected to NIC module
        inout nvlink_port[numNvlink_port];  // Connected to peers
}
